package com.hackordie.operations.deletes;

import com.hackordie.commons.HackOrDieResult;
import com.hackordie.exceptions.HackOrDieException;
import com.hackordie.operations.AHackOrDieOperationUserComponents;

public class DeleteUserComponent extends AHackOrDieOperationUserComponents {

	private final int componentId;

	public DeleteUserComponent(int idComponent) {
        this.componentId = idComponent;
    }

    @Override
	protected boolean checkParameters() {
		// TODO Auto-generated method stub
		return true;
	}

	@Override
	protected HackOrDieResult executeOperation() throws HackOrDieException {
	    result.setCorrect(userComponentDao.delete(componentId));
		return result;
	}

}
